package Entity;

import java.io.Serializable;

import javax.persistence.*;

import java.util.*;

@Entity
@Table (name = "Insumos")
public class InsumoEntity implements Serializable{

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column (name = "idInsumo")
	private int id;
	
	@Column (name = "Clasificacion", length = 30)
	private String clasificaion;
	
	@Column (name = "Nombre", length = 50)
	private String nombre;
	
	@Column (name = "CantidadMinima")
	private int cantMin;
	
	@Column (name = "FechaVencimiento")
	private Date fechaVenc;
	
	@Column (name = "FechaCompra")
	private Date fechaCompra;
	
	@ManyToMany 
	@JoinTable (name = "InsumoProveedor", joinColumns = {@JoinColumn (name = "idInsumo")}, inverseJoinColumns = { @JoinColumn(name = "idProveedor") })
	private List<ProveedorEntity> areas = new ArrayList<ProveedorEntity>();
}
